package com.fzhucc.modules.pms.repository;

import com.fzhucc.modules.pms.domain.ProjectSendPro;
import com.fzhucc.modules.pms.domain.ProjectSmall;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author yyg
 */
public interface ProjectSendProRepository extends JpaRepository<ProjectSendPro, String>, JpaSpecificationExecutor<ProjectSendPro> {


    @Query(nativeQuery = true, value = "SELECT p.* FROM pms_project p WHERE p.del_flag=0")
    List<ProjectSendPro> findAllByNormalStatusWithPart();

    @Query(nativeQuery = true, value = "SELECT p.* FROM pms_project p WHERE p.del_flag=0 and p.send_group=:sendGroup")
    List<ProjectSendPro> findAllByNormalStatusWithGroup(int sendGroup);

}